<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0px;
            margin: 0px;
            list-style: none;
        }

        .ul {
            width: 200px
        }

        .ul>li {
            position: relative;;
            line-height: 26px;
            height: 26px;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
        }

        .ul>li::before {
            position: absolute;
            left: 0px;
            bottom: 0px;
            height: 2px;
            width: 0%;
            content: "";
            background-color: #ff0000;
            
        }

        .ul>li:hover::before {
            content: "";
            display: block;
            width: 100%;
            transition: width 0.5s;
        }
    </style>
</head>
<body>
    <ul class="ul">
        <li>一二三四五六七八九十二二三四五六七八九十</li>
        <li>一二三四五六七八九十二二三四五六七八九十</li>
        <li>一二三四五六七八九十二二三四五六七八九十</li>
        <li>一二三四五六七八九十二二三四五六七八九十</li>
        <li>一二三四五六七八九十二二三四五六七八九十</li>
        <li>一二三四五六七八九十二二三四五六七八九十</li>
    </ul>
</body>
</html>